﻿using System.Linq.Expressions;
using Basic.OAModel.DB;
using Basic.OARemoteModel;
using Basic.OARemoteModel.DataFillIn.Model;
using WeDonekRpc.Model;

namespace Basic.OACollect
{
    public interface IDataFillInCollect
    {
        long Add ( FillInAdd data );

        void Delete ( DBEmpDataFillIn source );

        DBEmpDataFillIn Get ( long id );

        Result Get<Result> ( long id ) where Result : class;

        Result Get<Result> ( long id, Expression<Func<DBEmpDataFillIn, Result>> selector );

        Result[] Gets<Result> ( long[] ids ) where Result : class;

        Result[] Gets<Result> ( long[] ids, Expression<Func<DBEmpDataFillIn, Result>> selector );

        Result[] Query<Result> ( FillInQuery query, IBasicPage paging, out int count ) where Result : class;

        bool Set ( DBEmpDataFillIn source, FillInSet data );

        bool Stop ( DBEmpDataFillIn db );

        void SetAuditResult ( DBEmpDataFillIn source, FillInStatus status );
        void BeginAudit ( DBEmpDataFillIn db, int fillTotal );
    }
}